﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Elsa.Expressions.Contracts;
using Elsa.Extensions;
using Elsa.Workflows;
using Elsa.Workflows.Activities;
using Elsa.Workflows.Attributes;
using Elsa.Workflows.Memory;
using T.FAS.Runtime.MF.Entity;

namespace T.FAS.Runtime.MF.Activities
{
    public class FasParallelIterationActivity : ParallelForEach
    {

        public Dictionary<string, Variable> OutputVariables { get; set; }
        protected override async ValueTask ExecuteAsync(ActivityExecutionContext context)
        {

            base.ExecuteAsync(context);

            ////处理出参
            //if (OutputVariables != null && OutputVariables.Count() > 0)
            //{
            //    var expressionEvaluator = context.GetRequiredService<IExpressionEvaluator>();
            //    foreach (var variable in OutputVariables)
            //    {
            //        var conditionValue = await expressionEvaluator.EvaluateAsync<string>(variable.Condition, context.ExpressionExecutionContext);
            //        context.SetVariable(variable.Label, conditionValue);
            //    }
            //}


        }
    }
}

